home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 October / CHIP Turkiye Ekim 2000.iso / prog / naps / 04 / setup.exe / Gnucleus / HeaderCtrlEx.h < prev    next >
C/C++ Source or Header  |  2000-07-06  |  3KB  |  101 lines

  1. /********************************************************************************
  2.  
  3.     Gnucleus - A node application for the Gnutella network
  4.     Copyright (C) 2000 John Marshall
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 2 of the License.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18.  
  19.     For support, questions, comments, etc...
  20.     E-Mail: 
  21.         swabby@c0re.net
  22.     
  23.     Address:
  24.         21 Cadogan Way
  25.         Nashua, NH, USA 03062
  26.  
  27. ********************************************************************************/
  28.  
  29. #if !defined(AFX_MYHEADERCTRL_H__CC3DDBF3_EF5E_11D0_82AD_9A0A48000000__INCLUDED_)
  30. #define AFX_MYHEADERCTRL_H__CC3DDBF3_EF5E_11D0_82AD_9A0A48000000__INCLUDED_
  31.  
  32. #if _MSC_VER >= 1000
  33. #pragma once
  34. #endif // _MSC_VER >= 1000
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CMyHeaderCtrl window
  38.  
  39. class CMyHeaderCtrl : public CHeaderCtrl
  40. {
  41. // Construction
  42. public:
  43.     CMyHeaderCtrl();
  44.     CMyHeaderCtrl(CWnd* pWnd, void (CWnd::*fpDragCol)(int, int));
  45.     virtual ~CMyHeaderCtrl();
  46.  
  47. // Attributes
  48. public:
  49.  
  50. // Operations
  51. public:
  52.     // Remove all images from the header.
  53.     void RemoveAllSortImages();
  54.     // Remove the image from the specified column column 
  55.     void RemoveSortImage( int iItem );
  56.     // Set the image for the specified column
  57.     int SetSortImage( int nCol, BOOL bAsc );
  58.  
  59. // Overrides
  60.     // ClassWizard generated virtual function overrides
  61.     //{{AFX_VIRTUAL(CMyHeaderCtrl)
  62.     //}}AFX_VIRTUAL
  63.  
  64. // Implementation
  65. public:
  66.     void SetCallback(CWnd* pWnd, void (CWnd::*fpDragCol)(int, int));
  67.  
  68. protected:
  69.     BOOL    m_bCheckForDrag;
  70.     BOOL    m_bDragging;
  71.     int    *m_pWidth;
  72.     int    m_nDragCol;
  73.     int    m_nDropPos;
  74.     CRect    marker_rect;
  75.     void    (CWnd::*m_fpDragCol)(int, int);
  76.     CWnd    *m_pOwnerWnd;
  77.  
  78.     // Currently sorted column
  79.     int     m_nSortCol;
  80.     // Sorted ascending?
  81.     BOOL    m_bSortAsc;
  82.     
  83.     // Generated message map functions
  84. protected:
  85.     //{{AFX_MSG(CMyHeaderCtrl)
  86.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  87.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  88.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  89.     virtual void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );
  90.     //}}AFX_MSG
  91.  
  92.     DECLARE_MESSAGE_MAP()
  93. };
  94.  
  95. /////////////////////////////////////////////////////////////////////////////
  96.  
  97. //{{AFX_INSERT_LOCATION}}
  98. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  99.  
  100. #endif // !defined(AFX_MYHEADERCTRL_H__CC3DDBF3_EF5E_11D0_82AD_9A0A48000000__INCLUDED_)
  101.